<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Dokument2</title>
        <script type="text/javascript">
          function fun() {
              objekt = new Object();
              objekt.ime = "Dam";
              objekt.prezime = "Damar";

              for (prop in objekt) {
                  window.alert(objekt[prop]);
              }
          }
        </script>
    </head>
    <body>
        <input id="it1"/><button type="button" onclick="fun()">Button</button>
        <div id="div2">
            <a href="answer.html" id="answer_link">Get the answer</a>
        </div>
        <script type="text/javascript">
          var polje = document.getElementById("it1");
          polje.onmouseover = function () {
              polje.style.backgroundColor = "Fuchsia";
              polje.style.borderWidth = "7px";
              polje.value = "Enter";
          }
          polje.onmouseout = function () {
              polje.style.background = "White";
              polje.style.borderWidth = "1px";
              polje.value = "";
          }

          var d1 = document.getElementById("div2");
          var a1 = document.getElementById("answer_link");
          a1.onclick = function () {
              d1.innerHTML = "<strong> promijenjen html</strong>";
              return false;
          }
        </script>
    </body>
</html>